function setLocalStrorage(key,value){
    if(value instanceof Array || value instanceof Object){
        value=JSON.stringify(value)
        localStorage.setItem(key,value)
    }
     
}
const getLocalStorage=(value)=>{
    var val =localStorage.getItem(value)
    var reg=/^[[{].*[\]}]$/
    if(reg.test(val)){
        val =JSON.parse(val)
    }
    return val
}
export {setLocalStrorage,getLocalStorage}